import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;


public class QSaveButton extends JButton implements ActionListener {

	private QuestionWindow w;
	
	public QSaveButton(QuestionWindow w) {
		super("Save");
		this.w = w;
		
		addActionListener(this);
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		w.saveQuestion();
		w.dispose();
	}

}
